package com.ogms.dge.container.modules.data.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.networknt.schema.ValidationMessage;
import com.ogms.dge.container.common.utils.PageUtils;
import com.ogms.dge.container.modules.common.entity.UploadRecordEntity;
import com.ogms.dge.container.modules.data.entity.SourceEntity;
import com.ogms.dge.container.modules.fs.entity.dto.UploadResultDto;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 数据源
 *
 * @author Lingkai Shi
 * @email lingkai.shi@nnu.edu.cn
 * @date 2024-09-23 15:10:30
 */
public interface SourceService extends IService<SourceEntity> {

    PageUtils queryPage(Map<String, Object> params);

    Map<String, Object> uploadSource(Long userId, MultipartFile file, String fileName, Integer chunkIndex, Integer chunks);

    void delete(Long[] ids);

    void extract(UploadRecordEntity record, Long userId, Date curDate, String uuid, String fileName, File targetFolder) throws JsonProcessingException;

    List<ValidationMessage> insValidate(Map<String, Object> json) throws JsonProcessingException;

    List<ValidationMessage> validate(Map<String, Object> json) throws JsonProcessingException;
}

